package secondassigment;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//import java.util.regex.Matcher;
//import java.util.Scanner;
//import java.util.regex.Pattern;

public class Controller {
 public static void main(String args[]) throws IOException{
	 System.out.println("enter command and directory of search (use '>' for search by word ) ");
	 BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	 String str=br.readLine();
	 
	 String[] str_mas = str.split(" ");
     String command = str_mas[0];
     String directory = str_mas[1];
     
     if(command.equals("dir")){
    	 DirView d = new DirView();
		 d.execute(directory);
     }
	 
	 if(command.equals("tree")){
	
		 DirViewTree t = new DirViewTree();
		 t.execute(directory);
	    
 }
	 
	 if(command.equals("find")){
		
		 Find f = new Find();
		 f.execute(directory);
}
}
}
